<template>
  <div class="home">
    <van-nav-bar title="首页" />
    <div class="content">
      <van-button type="primary" @click="handleToast">点击测试</van-button>
      <div class="demo-box">
        <p class="text">这是一段测试文字</p>
        <div class="box"></div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { showToast } from 'vant'

const handleToast = () => {
  showToast('测试成功')
}
</script>

<style lang="scss" scoped>
.home {
  .content {
    padding: 16px;
    
    .demo-box {
      margin-top: 20px;
      
      .text {
        font-size: 14px;
        margin-bottom: 10px;
      }
      
      .box {
        width: 100px;
        height: 100px;
        background-color: #3f45ff;
        border-radius: 8px;
      }
    }
  }
}
</style>

